<template>
  <div class="shuoming_box">
    <div class="qiehuan">
      <router-link tag="span" replace to="guanfangwen">{{official}}</router-link>
      <router-link tag="span" replace to="xinyongwen">{{credit}}</router-link>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      official: "",
      credit: ""
    };
  },
  //模板渲染之前请求get
  created() {
    this.http
      .get("/api/game/help")
      .then(res => {
        console.log(res.data[0].content);
        if (res.status_code == 200) {
          this.official = res.data[0].title;
          this.credit = res.data[1].title;
        } else {
           this.$toast(res.message);
        }
      })
 
  }
};
</script>

<style>
@import url("../../assets/css/ttcp/shuoming.css");
.shuoming_box .qiehuan .router-link-active {
  border-radius: 0.25rem;
  background-color: #d31d17;
  color: #ffffff;
}
</style>